//
//  PayJieBController01.m
//  PosApp
//
//  Created by 李英新 on 2018/10/18.
//  Copyright © 2018年 李英新. All rights reserved.
//

#import "PayJieBController01.h"

@interface PayJieBController01 ()

@end

@implementation PayJieBController01

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}
- (IBAction)ClickOnBtnOfJb01:(id)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}
- (IBAction)ClickOnBtnOfJB02:(id)sender {
    NSMutableDictionary * dic = [[NSMutableDictionary alloc] init];
    [dic setObject:KUseriPhone forKey:@"phone"];
    [dic setObject:@"Alipay" forKey:@"account_type"];
    
    [MainObjectWay PostWithMethod:@"account_unbind" andAction:@"User" andAddParam:YES parameters:dic success:^(id responseObject) {
        NSLog(@"解绑成功信息 = %@",responseObject);
        NSLog(@"返回信息 = %@",responseObject[@"msg"]);
        if ([MainObjectWay IsSucceedWithCode:responseObject[@"code"]]) {
            [self dismissViewControllerAnimated:YES completion:^{
                [self.delegate ClickOnBtnToTure];
            }];
            
        }else{
            [MBProgressHUD showAlertViewWithText:@"解绑失败"];
        }
    } failure:^(NSError *error) {
        NSLog(@"错误信息 = %@",error);
        [MBProgressHUD showAlertViewWithText:@"解绑失败"];
    }];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
